	.file	"Memory_TLBMiss.c"
	.section	.rodata
.LC1:
	.string	"Option"
.LC2:
	.string	"NumReads"
.LC3:
	.string	"BufferSize"
	.align 4
.LC4:
	.string	"Error while allocating memory to buffer\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	andl	$-16, %esp
	subl	$96, %esp
	movl	$0, 48(%esp)
	movl	$0, 60(%esp)
	fldz
	fstpl	72(%esp)
	movl	$.LC1, 28(%esp)
	leal	48(%esp), %eax
	movl	%eax, 24(%esp)
	movl	$.LC2, 20(%esp)
	leal	44(%esp), %eax
	movl	%eax, 16(%esp)
	movl	$.LC3, 12(%esp)
	leal	40(%esp), %eax
	movl	%eax, 8(%esp)
	movl	12(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	validateAndFill2InputArgumentsWithOption
	movl	48(%esp), %eax
	movl	%eax, 64(%esp)
	movl	$0, (%esp)
	call	time
	movl	%eax, (%esp)
	call	srand
	leal	80(%esp), %eax
	movl	%eax, 4(%esp)
	movl	$0, (%esp)
	call	clock_gettime
	movl	40(%esp), %eax
	movl	%eax, (%esp)
	call	malloc
	movl	%eax, 60(%esp)
	cmpl	$0, 60(%esp)
	jne	.L2
	movl	$.LC4, (%esp)
	call	perror
	movl	$1, %eax
	jmp	.L4
.L2:
	movl	40(%esp), %eax
	movl	%eax, 4(%esp)
	movl	60(%esp), %eax
	movl	%eax, (%esp)
	call	fillAllocatedMemory
	leal	88(%esp), %eax
	movl	%eax, 4(%esp)
	movl	$0, (%esp)
	call	clock_gettime
	movl	88(%esp), %eax
	movl	92(%esp), %edx
	movl	%eax, 8(%esp)
	movl	%edx, 12(%esp)
	movl	80(%esp), %eax
	movl	84(%esp), %edx
	movl	%eax, (%esp)
	movl	%edx, 4(%esp)
	call	getDiffInNanoSeconds
	fstpl	72(%esp)
	movl	44(%esp), %ecx
	movl	40(%esp), %edx
	movl	48(%esp), %eax
	movl	%ecx, 12(%esp)
	movl	%edx, 8(%esp)
	movl	60(%esp), %edx
	movl	%edx, 4(%esp)
	movl	%eax, (%esp)
	call	constructReadParams
	movl	%eax, 68(%esp)
	movl	68(%esp), %eax
	movl	%eax, 12(%esp)
	movl	$runWorkload, 8(%esp)
	movl	$0, 4(%esp)
	leal	52(%esp), %eax
	movl	%eax, (%esp)
	call	pthread_create
	movl	$0, 12(%esp)
	movl	$fillUpResidentSet, 8(%esp)
	movl	$0, 4(%esp)
	leal	56(%esp), %eax
	movl	%eax, (%esp)
	call	pthread_create
	movl	56(%esp), %eax
	movl	$0, 4(%esp)
	movl	%eax, (%esp)
	call	pthread_join
	movl	52(%esp), %eax
	movl	$0, 4(%esp)
	movl	%eax, (%esp)
	call	pthread_join
	movl	60(%esp), %eax
	movl	%eax, (%esp)
	call	free
	movl	$0, %eax
.L4:
	leave
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC7:
	.string	"%f %f\n"
	.text
	.globl	runWorkload
	.type	runWorkload, @function
runWorkload:
.LFB1:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	subl	$88, %esp
	movl	8(%ebp), %eax
	movl	%eax, -52(%ebp)
	movl	-52(%ebp), %eax
	movl	(%eax), %eax
	movl	%eax, -48(%ebp)
	movl	-52(%ebp), %eax
	movl	4(%eax), %eax
	movl	%eax, -44(%ebp)
	movl	-52(%ebp), %eax
	movl	8(%eax), %eax
	movl	%eax, -40(%ebp)
	movl	-52(%ebp), %eax
	movl	12(%eax), %eax
	movl	%eax, -36(%ebp)
	call	sched_yield
	movl	$5, (%esp)
	call	sleep
	call	sched_yield
	leal	-24(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	$0, (%esp)
	call	clock_gettime
	movl	-48(%ebp), %eax
	cmpl	$1, %eax
	je	.L8
	cmpl	$1, %eax
	jb	.L7
	cmpl	$2, %eax
	je	.L9
	jmp	.L6
.L7:
	movl	-36(%ebp), %eax
	movl	%eax, 8(%esp)
	movl	-40(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	-44(%ebp), %eax
	movl	%eax, (%esp)
	call	doSequentialReads
	jmp	.L6
.L8:
	movl	-36(%ebp), %eax
	movl	%eax, 8(%esp)
	movl	-40(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	-44(%ebp), %eax
	movl	%eax, (%esp)
	call	doRandOffsetAndSequentialReads
	jmp	.L6
.L9:
	movl	-36(%ebp), %eax
	movl	%eax, 8(%esp)
	movl	-40(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	-44(%ebp), %eax
	movl	%eax, (%esp)
	call	doRandomReads
	nop
.L6:
	leal	-16(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	$0, (%esp)
	call	clock_gettime
	movl	-16(%ebp), %eax
	movl	-12(%ebp), %edx
	movl	%eax, 8(%esp)
	movl	%edx, 12(%esp)
	movl	-24(%ebp), %eax
	movl	-20(%ebp), %edx
	movl	%eax, (%esp)
	movl	%edx, 4(%esp)
	call	getDiffInNanoSeconds
	fstpl	-32(%ebp)
	fildl	-36(%ebp)
	fldl	-32(%ebp)
	fdivp	%st, %st(1)
	fildl	-40(%ebp)
	fldl	.LC6
	fdivrp	%st, %st(1)
	fxch	%st(1)
	fstpl	12(%esp)
	fstpl	4(%esp)
	movl	$.LC7, (%esp)
	call	printf
	movl	$0, %eax
	leave
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
.LFE1:
	.size	runWorkload, .-runWorkload
	.globl	fillUpResidentSet
	.type	fillUpResidentSet, @function
fillUpResidentSet:
.LFB2:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	subl	$40, %esp
	movl	$524288000, -16(%ebp)
	movl	-16(%ebp), %eax
	movl	%eax, (%esp)
	call	malloc
	movl	%eax, -12(%ebp)
	cmpl	$0, -12(%ebp)
	jne	.L12
	movl	$.LC4, (%esp)
	call	perror
	movl	$0, %eax
	jmp	.L13
.L12:
	movl	-16(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	-12(%ebp), %eax
	movl	%eax, (%esp)
	call	fillAllocatedMemory
	movl	$0, %eax
.L13:
	leave
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
.LFE2:
	.size	fillUpResidentSet, .-fillUpResidentSet
	.globl	constructReadParams
	.type	constructReadParams, @function
constructReadParams:
.LFB3:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	subl	$40, %esp
	movl	$16, (%esp)
	call	malloc
	movl	%eax, -12(%ebp)
	movl	-12(%ebp), %eax
	movl	8(%ebp), %edx
	movl	%edx, (%eax)
	movl	-12(%ebp), %eax
	movl	12(%ebp), %edx
	movl	%edx, 4(%eax)
	movl	-12(%ebp), %eax
	movl	16(%ebp), %edx
	movl	%edx, 8(%eax)
	movl	-12(%ebp), %eax
	movl	20(%ebp), %edx
	movl	%edx, 12(%eax)
	movl	-12(%ebp), %eax
	leave
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
.LFE3:
	.size	constructReadParams, .-constructReadParams
	.section	.rodata
.LC8:
	.string	"%d\t%f\n"
	.text
	.globl	doSequentialReads
	.type	doSequentialReads, @function
doSequentialReads:
.LFB4:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	subl	$152, %esp
	movl	8(%ebp), %eax
	movl	%eax, -108(%ebp)
	movl	%gs:20, %eax
	movl	%eax, -12(%ebp)
	xorl	%eax, %eax
	movl	$0, -92(%ebp)
	movl	$0, -84(%ebp)
	movl	$0, -88(%ebp)
	movl	$1, -80(%ebp)
	movl	$10000, (%esp)
	call	malloc
	movl	%eax, -76(%ebp)
	fldz
	fstpl	-72(%ebp)
	call	rand
	movl	%eax, %edx
	sarl	$31, %edx
	idivl	12(%ebp)
	movl	%edx, -92(%ebp)
	movl	$0, -88(%ebp)
	jmp	.L17
.L18:
	movl	12(%ebp), %eax
	movl	%eax, 8(%esp)
	movl	-80(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	-92(%ebp), %eax
	movl	%eax, (%esp)
	call	getNextOffsetWithinPage
	movl	%eax, -84(%ebp)
	leal	-60(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	$0, (%esp)
	call	clock_gettime
	movl	-92(%ebp), %edx
	movl	-108(%ebp), %eax
	addl	%edx, %eax
	movzbl	(%eax), %eax
	movb	%al, -93(%ebp)
	leal	-52(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	$0, (%esp)
	call	clock_gettime
	movl	-52(%ebp), %eax
	movl	-48(%ebp), %edx
	movl	%eax, 8(%esp)
	movl	%edx, 12(%esp)
	movl	-60(%ebp), %eax
	movl	-56(%ebp), %edx
	movl	%eax, (%esp)
	movl	%edx, 4(%esp)
	call	getDiffInNanoSeconds
	fstpl	-72(%ebp)
	fldl	-72(%ebp)
	fstpl	12(%esp)
	movl	-88(%ebp), %eax
	movl	%eax, 8(%esp)
	movl	$.LC8, 4(%esp)
	leal	-42(%ebp), %eax
	movl	%eax, (%esp)
	call	sprintf
	leal	-42(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	-76(%ebp), %eax
	movl	%eax, (%esp)
	call	strcat
	movl	-84(%ebp), %eax
	movl	%eax, -92(%ebp)
	addl	$1, -88(%ebp)
.L17:
	movl	-88(%ebp), %eax
	cmpl	16(%ebp), %eax
	jl	.L18
	movl	-76(%ebp), %eax
	movl	%eax, (%esp)
	call	puts
	movl	-12(%ebp), %eax
	xorl	%gs:20, %eax
	je	.L19
	call	__stack_chk_fail
.L19:
	leave
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
.LFE4:
	.size	doSequentialReads, .-doSequentialReads
	.globl	doRandOffsetAndSequentialReads
	.type	doRandOffsetAndSequentialReads, @function
doRandOffsetAndSequentialReads:
.LFB5:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	subl	$152, %esp
	movl	8(%ebp), %eax
	movl	%eax, -108(%ebp)
	movl	%gs:20, %eax
	movl	%eax, -12(%ebp)
	xorl	%eax, %eax
	movl	16(%ebp), %ecx
	movl	$1431655766, %edx
	movl	%ecx, %eax
	imull	%edx
	movl	%ecx, %eax
	sarl	$31, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	%ecx, %eax
	movl	%eax, -88(%ebp)
	movl	$0, -100(%ebp)
	movl	$0, -84(%ebp)
	movl	$0, -96(%ebp)
	movl	$1, -80(%ebp)
	movl	$0, -92(%ebp)
	movl	$10000, (%esp)
	call	malloc
	movl	%eax, -76(%ebp)
	fldz
	fstpl	-72(%ebp)
	movl	$0, -96(%ebp)
	jmp	.L21
.L24:
	call	rand
	movl	%eax, %edx
	sarl	$31, %edx
	idivl	12(%ebp)
	movl	%edx, -100(%ebp)
	movl	$0, -92(%ebp)
	jmp	.L22
.L23:
	movl	12(%ebp), %eax
	movl	%eax, 8(%esp)
	movl	-80(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	-100(%ebp), %eax
	movl	%eax, (%esp)
	call	getNextOffsetWithinPage
	movl	%eax, -84(%ebp)
	leal	-60(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	$0, (%esp)
	call	clock_gettime
	movl	-100(%ebp), %edx
	movl	-108(%ebp), %eax
	addl	%edx, %eax
	movzbl	(%eax), %eax
	movb	%al, -101(%ebp)
	leal	-52(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	$0, (%esp)
	call	clock_gettime
	movl	-52(%ebp), %eax
	movl	-48(%ebp), %edx
	movl	%eax, 8(%esp)
	movl	%edx, 12(%esp)
	movl	-60(%ebp), %eax
	movl	-56(%ebp), %edx
	movl	%eax, (%esp)
	movl	%edx, 4(%esp)
	call	getDiffInNanoSeconds
	fstpl	-72(%ebp)
	fldl	-72(%ebp)
	fstpl	12(%esp)
	movl	-96(%ebp), %eax
	movl	%eax, 8(%esp)
	movl	$.LC8, 4(%esp)
	leal	-42(%ebp), %eax
	movl	%eax, (%esp)
	call	sprintf
	leal	-42(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	-76(%ebp), %eax
	movl	%eax, (%esp)
	call	strcat
	movl	-84(%ebp), %eax
	movl	%eax, -100(%ebp)
	addl	$1, -92(%ebp)
.L22:
	cmpl	$2, -92(%ebp)
	jle	.L23
	addl	$1, -96(%ebp)
.L21:
	movl	-96(%ebp), %eax
	cmpl	-88(%ebp), %eax
	jl	.L24
	movl	-76(%ebp), %eax
	movl	%eax, (%esp)
	call	puts
	movl	-12(%ebp), %eax
	xorl	%gs:20, %eax
	je	.L25
	call	__stack_chk_fail
.L25:
	leave
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
.LFE5:
	.size	doRandOffsetAndSequentialReads, .-doRandOffsetAndSequentialReads
	.globl	doRandomReads
	.type	doRandomReads, @function
doRandomReads:
.LFB6:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	subl	$152, %esp
	movl	8(%ebp), %eax
	movl	%eax, -108(%ebp)
	movl	%gs:20, %eax
	movl	%eax, -12(%ebp)
	xorl	%eax, %eax
	movl	$0, -84(%ebp)
	movl	$0, -88(%ebp)
	movl	$0, -80(%ebp)
	movl	$10000, (%esp)
	call	malloc
	movl	%eax, -76(%ebp)
	fldz
	fstpl	-72(%ebp)
	movl	$0, -88(%ebp)
	jmp	.L27
.L28:
	call	rand
	movl	%eax, %edx
	sarl	$31, %edx
	idivl	12(%ebp)
	movl	%edx, -84(%ebp)
	leal	-60(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	$0, (%esp)
	call	clock_gettime
	movl	-84(%ebp), %edx
	movl	-108(%ebp), %eax
	addl	%edx, %eax
	movzbl	(%eax), %eax
	movb	%al, -89(%ebp)
	leal	-52(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	$0, (%esp)
	call	clock_gettime
	movl	-52(%ebp), %eax
	movl	-48(%ebp), %edx
	movl	%eax, 8(%esp)
	movl	%edx, 12(%esp)
	movl	-60(%ebp), %eax
	movl	-56(%ebp), %edx
	movl	%eax, (%esp)
	movl	%edx, 4(%esp)
	call	getDiffInNanoSeconds
	fstpl	-72(%ebp)
	fldl	-72(%ebp)
	fstpl	12(%esp)
	movl	-88(%ebp), %eax
	movl	%eax, 8(%esp)
	movl	$.LC8, 4(%esp)
	leal	-42(%ebp), %eax
	movl	%eax, (%esp)
	call	sprintf
	leal	-42(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	-76(%ebp), %eax
	movl	%eax, (%esp)
	call	strcat
	addl	$1, -88(%ebp)
.L27:
	movl	-88(%ebp), %eax
	cmpl	16(%ebp), %eax
	jl	.L28
	movl	-76(%ebp), %eax
	movl	%eax, (%esp)
	call	puts
	movl	-12(%ebp), %eax
	xorl	%gs:20, %eax
	je	.L29
	call	__stack_chk_fail
.L29:
	leave
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
.LFE6:
	.size	doRandomReads, .-doRandomReads
	.section	.rodata
	.align 8
.LC6:
	.long	0
	.long	1093664768
	.ident	"GCC: (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2"
	.section	.note.GNU-stack,"",@progbits
